<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>

<rich:panel header="#{messages['rci.booking.entry.mgmt.menu']}">
	
	<h:panelGrid width="100%" columns="1">
		<h:panelGroup>
			<h:panelGrid>
				<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
			</h:panelGrid>
		</h:panelGroup>
		
		<h:panelGroup>
			<h:panelGrid width="100%">
				<h:panelGroup>
				    <h:outputText value="#{messages['rci.booking.entry']}" styleClass="sub_header" />
					<h:outputText value="*" styleClass="standardText_Mandatory" />
					<h:outputText value="#{messages['instruction']}" styleClass="standardText_Instruction" />
				</h:panelGroup>
			</h:panelGrid>
		</h:panelGroup>
		
	</h:panelGrid>
	
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		

		<h:outputText></h:outputText>
		<t:message for="rciBulkBankId" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="rciBulkBankId" value="#{messages['rci.bulk.bank.deposit.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:selectOneMenu id="rciBulkBankId" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciBulkBank.rciBulkBankId}" required="true">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
				<f:selectItems value="#{adminRCIBean.selectRCIBulkBankList}"/>
			</t:selectOneMenu>
		</h:panelGroup>		


<%--- 
		<h:outputText></h:outputText>
		<t:message for="rciType" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="rciType" value="#{messages['rci.type']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:selectOneMenu id="rciType" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciType}" required="true">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
				<f:selectItems value="#{adminRCIBean.selectRCIType}"/>
				<a4j:support ajaxSingle="true" event="onchange" reRender="splitWeekDiv1,splitWeekDiv2,splitWeekDiv3,splitWeekDiv4,rciMemberRefId"></a4j:support>
			</t:selectOneMenu>
		</h:panelGroup>		
---%>

    	<h:outputText  ></h:outputText>
    	<t:message id="splitWeek2"  for="rciSplitWeekConfigId" styleClass="error"></t:message>
    	<h:panelGroup id="splitWeek3" >
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="rciSplitWeekConfigId" value="#{messages['rci.split.week']}" styleClass="standardText_Label" />
		</h:panelGroup>
    	<h:panelGroup id="splitWeek4" >
			<t:selectOneMenu id="rciSplitWeekConfigId" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciSplitWeekConfig.rciSplitWeekConfigId}" required="true">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
				<f:selectItems value="#{adminRCIBean.selectRCISplitWeeks}"/>
			</t:selectOneMenu>
		</h:panelGroup>	

  	
		<h:outputText  ></h:outputText>
		<t:message  for="rciIdNo" styleClass="error"></t:message>
		<h:panelGroup >
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="rciIdNo" value="#{messages['rci.id.no']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup >
			<t:inputText id="rciIdNo" required="true" size="50" maxlength="50" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciIdNo}"></t:inputText>
		</h:panelGroup>		

		<h:outputText  ></h:outputText>
		<t:message  for="rciMemberFullname" styleClass="error"></t:message>
		<h:panelGroup >
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="rciMemberFullname" value="#{messages['rci.member.name.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup >
			<t:inputText id="rciMemberFullname" required="true" size="50" maxlength="50" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciMemberFullName}"></t:inputText>
		</h:panelGroup>		

		<h:outputText  ></h:outputText>
		<t:message  for="guestName" styleClass="error"></t:message>
		<h:panelGroup >
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="guestName" value="#{messages['guest.name.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup >
			<t:inputText id="guestName" required="true" size="50" maxlength="50" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciGuestName}"></t:inputText>
		</h:panelGroup>		

		<h:outputLabel  value="#{messages['address']}" styleClass="standardText_Label" />
		<t:inputText  required="false" size="50" maxlength="50" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciMemberAddr1}"></t:inputText>
		
		<h:outputText  ></h:outputText>
		<t:inputText  required="false" size="50" maxlength="50" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciMemberAddr2}"></t:inputText>
		
		<h:outputText  ></h:outputText>
		<t:inputText  required="false" size="50" maxlength="50" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciMemberAddr3}"></t:inputText>

<%-- 
 	  <t:div id="checkInDiv1">
		<h:outputText rendered="#{!adminRCIBean.incomingMember}"></h:outputText>
      </t:div>
      <t:div id="checkInDiv2">
		<t:message rendered="#{!adminRCIBean.incomingMember}" for="checkIn" styleClass="error"></t:message>
      </t:div>
      <t:div id="checkInDiv3">
		<h:panelGroup rendered="#{!adminRCIBean.incomingMember}">
	    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
		    <h:outputLabel for="checkIn" value="#{messages['booking.checkin.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
      </t:div>
      <t:div id="checkInDiv4">
		<h:panelGroup rendered="#{!adminRCIBean.incomingMember}">
		    	<t:inputCalendar
		    	id="checkIn"
					monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" 
					currentDayCellClass="currentDayCell" value="#{adminRCIBean.rciBookingEntry.rciCheckInDate}"
					renderAsPopup="true" popupTodayString="#{messages['popup.today']}"
					popupWeekString="#{messages['popup.week']}" popupDateFormat="dd/MM/yyyy"
					renderPopupButtonAsImage="true" 
					styleClass="standardText" required="true"
		    	>
		    	</t:inputCalendar>
		</h:panelGroup>
	  </t:div>	
	--%>	
		<rich:spacer height="10"></rich:spacer>
		
		<t:panelGroup>
		   <t:panelGrid columns="2">
		   		<h:commandButton value="#{messages['create']}" styleClass="button" action="#{adminRCIBean.addRCIBookingEntryAction}" actionListener="#{adminRCIBean.addRCIBookingEntryActionListener}"></h:commandButton>
			    <h:commandButton value="#{messages['back']}" styleClass="button" action="#{adminRCIBean.initRCIBookingEntryAction}" actionListener="#{adminRCIBean.initRCIBookingEntryActionListener}" immediate="true"></h:commandButton>
		   </t:panelGrid>
		</t:panelGroup>
	</t:panelGrid>
</rich:panel>	